const mysql=require("mysql")
const conn=mysql.createConnection({
    host:"127.0.0.1",
    user:"root",
    password:"root",
    database:"zhoukaixin"
})
conn.connect();
conn.query("select  *  from  user",(err,results)=>{
if (err) {
    return console.log("sql语法错误"+err.message);
}
console.log(results);
})
conn.end();